import Permission from "./modules/Permission.js";
import WebController from "./modules/WebController.js";

console.warn("[collectionPlugin]", "inject.js is running.");

let permission = new Permission();
let userName = jQuery("div.info > p.names").text();
permission.getUserPermission(userName).then(userPermission => {
    jQuery("div.info > p.org").text(userPermission);
    if ((!userPermission) || (userPermission === "disabled")) {
        return;
    } else {
        window.jQuery = jQuery.noConflict(true);
        window.webController = new WebController(permission);
    }
});
